/**
 * 
 */
package mwt.xml.xdbforms.xformlayer.transactions.impl;

import mwt.xml.xdbforms.dblayer.startup.XDBFormsDriverManagerStartup;
import mwt.xml.xdbforms.xformlayer.transactions.XFormTransaction;
import mwt.xml.xdbforms.xformlayer.transactions.XFormTransactionFactory;

/**
 * Classe Factory per la creazione di "transazioni" di insert e
 * update per mezzo di documenti XForm. Questa classe usa
 * il drivermanager per la connessione.
 *
 *
 * Progetto Master Web Technology
 * @author Gianfranco Murador, Cristian Castiglia, Matteo Ferri
 */
public class XFormTransactionFactoryDM extends XFormTransactionFactory {

    public XFormTransactionFactoryDM() {
        // Inizializza la connessione con il database
        XDBFormsDriverManagerStartup.createConnectionFactory();
    }

    @Override
    public XFormTransaction newXFormInsertTransaction(String database) {
        return new XFormInsert(database);

    }

    @Override
    public XFormTransaction newXFormUpdateTransaction(String database) {
        return new XFormUpdate(database);
    }
}
